<template>
	<view class="content homePage">
		<top />
		<swiper :autoplay="true" :interval="5000" :duration="1000">
			<swiper-item v-for="(item, index) in banner" :key="index">
				<view class="swiper-item" :class="item.is_video == 1?'video':''">
					<block v-if="item.is_video == 1">
						<image @click="playVideo(item)" mode="widthFix" class="icon" src="@/static/video.png"></image>
						<image style="width: 100%;" mode="widthFix" :src="baseUrl+item.video_img"></image>
					</block>
					<image v-else style="width: 100%;" mode="widthFix" :src="baseUrl+item.banner"></image>
				</view>
			</swiper-item>
		</swiper>
		<!-- 介绍一 -->
		<introduce :info="introduce1"
			video="https://aisisoft-cn-homepage-1312366157.cos.ap-nanjing.myqcloud.com/ceshi/qiye.mp4"
			videoUrl="https://aisisoft-cn-homepage-1312366157.cos.ap-nanjing.myqcloud.com/ceshi/qiye.png" />
		<!-- 介绍二  -->
		<view class="introduce cont2">
			<view class="content">
				<view class="left">
					<view class="title">
						{{ introduce2.title}}
					</view>
					<view class="name ">
						{{ introduce2.name }}
					</view>
					<view class="desc">
						{{ introduce2.desc }}
					</view>
					<view class="title2">
						产品特点
					</view>
					<view class="desc" v-for="(item, index) in introduce2.arr" :key="index">
						<span>{{ item.name }}：</span>
						{{item.text}}
					</view>
					<view class="more">
						Load More <image mode="widthFix" style="width: 20px; margin-left: 10px;"
							src="@/static/more2.png"></image>
					</view>
				</view>
				<view class="video_img">
					<video id="videoRef" :style="{'height': videoHeight+'px'}" src="https://aisisoft-cn-homepage-1312366157.cos.ap-nanjing.myqcloud.com/ceshi/chanpin.mp4"></video>
				</view>
			</view>
		</view>
		<!-- 介绍三 -->
		<view class="introduce cont3">
			<view class="top-cont">
				<view class="title">
					Application Area
				</view>
				产品应用
			</view>
			<view class="content">
				<view class="item" :class="index%2?'fall':'just'" v-for="(item, index) in introduce3" :key="index">
					<view class="text">
						<view class="title">
							{{ item.title }}
						</view>
						<view class="te">
							{{ item.text }}
						</view>
					</view>
					<view class="image">
						<image mode="widthFix" :src="baseUrl+item.image"></image>
					</view>
				</view>
			</view>
		</view>
		<!-- 新闻  -->
		<view class="news">
			<view class="top-cont">
				<view class="title">
					News
				</view>
				新闻
			</view>
			<view class="content">
				<view class="item" v-for="(item, index) in newList" :key="index" @click="jumpPage(item)">
					<image mode="widthFix" :src="baseUrl+item.abbreviation_url"></image>
					<view class="title">
						{{ item.title }}
					</view>
					{{ item.text }}
				</view>
			</view>
		</view>
		<bottom />
		<uni-popup ref="popup">
			<view class="popup-content">
				<video :src="videoSrc" :style="{'height':videoHeight}"></video>
				<image class="close" src="@/static/close.png" @click="close"></image>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import mixins from '../mixins';
	import top from '@/components/top/index.vue'
	import bottom from '@/components/bottom/index.vue'
	import introduce from '@/components/introduce/index.vue'
	export default {
		mixins: mixins,
		components: {
			top,
			bottom,
			introduce
		}
	}
</script>

<style lang="scss" scoped src="../style.scss"></style>